package com.my.chapter9;

public class practice14 {
    static void A(P14A a){
        a.A();
    }
    static void B(P14B b){
        b.B();
    }
    static void C(P14C c){
        c.C();
    }
    static void D(P14D d){
        d.D();
    }

    public static void main(String[] args) {
        ApplyP14 p = new ApplyP14();
        A(p);
        B(p);
        C(p);
        D(p);
    }
}

interface P14A{
    void A();
}

interface P14B{
    void B();
}

interface P14C{
    void C();
}

interface P14D extends P14A,P14B,P14C{
    void D();
}

class ApplyP14 implements P14D{

    @Override
    public void A() {
        System.out.println("A()");
    }

    @Override
    public void B() {
        System.out.println("B()");
    }

    @Override
    public void C() {
        System.out.println("C()");
    }

    @Override
    public void D() {
        System.out.println("D()");
    }
}


